import { createApp } from 'vue';
import { createPinia } from 'pinia';
import App from './App.vue';
import router from './router';
import bus from './utils/bus';
import piniaPlugin from 'pinia-plugin-persistedstate';

//引入全局的less文件
import './assets/global.less';
//引入Pinia
//引入elementul-plus
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
//路由守卫引入到全局
import './utils/routerHook';
let pinia = createPinia();
let app = createApp(App);
//注册全局组件,所有的组件里面不需要引入都可以使用
// app.component('breadCrumb', breadCrumb)
//将bus添加到全局
app.config.globalProperties.$bus = bus;

app.use(router);
pinia.use(piniaPlugin);
app.use(ElementPlus);
app.use(createPinia);
app.use(pinia);
app.mount('#app');
